function foo(x: string, y: number): string {
    return x + y
}
foo('aa', 456);

let fun = function (x: string, y: number): string {
    return x + y
}
console.log(fun('55', 555));


let boo: (x: string, y: number) => string = function (x: string, y: number): string {
    return x + y;
}
console.log(boo('145', 456));


function boo1(x: string, y: string, z?: string): string {
    return x + y + z
}
console.log(boo1('a', 'b'))
console.log(boo1('a', 'b', 'c'));

function boo2(x: string, y: string = 'zheshu'): string {
    console.log(y);
    return x + y
}
console.log(boo2('1'));

// 
function boo3(x: string, y: string, ...args: string[]): string {
    console.log(args);
    return x + y;
}

console.log(boo3('1', '2'));
console.log(boo3('1', '2', '3', '4'));

interface Fun {
    (x: string, y: string): string
}
let yangyang: Fun = function (x: string, y: string): string {
    return x + y;
}
console.log(yangyang('a', 'b'));

let sizhe: Fun = function (a: string, b: string): string {
    return a + b;
}
console.log(sizhe('12', '34'));

export {
    foo,
}